home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_docs / connex.txt < prev    next >
Text File  |  1996-06-25  |  24KB  |  435 lines

  1. .TL
  2. Amateur Packet Radio and TCP/IP
  3. .AU
  4. Phil Karn, KA9Q
  5. .NH
  6. Introduction - What's Special About Amateur Packet Radio?
  7. .PP
  8. A new and rapidly growing activity within amateur (ham) radio is packet
  9. radio.  From a small-scale experimental beginning in the early 1980s, an
  10. estimated 30,000 amateurs around the world now own equipment capable of
  11. reliably sending digital data over the air. [KARN]
  12. .PP
  13. Of course, hams did not invent packet radio; the Aloha experiments in
  14. Hawaii predated the earliest amateur networks by almost a decade. 
  15. However, amateur packet radio is noteworthy for the following reasons:
  16. .IP [1]
  17. Amateur radio operation requires an FCC license, granted only to
  18. applicants passing tests in Morse code, radio and electronics theory,
  19. and FCC rules and regulations.  Once licensed, however, a ham has easy
  20. access to a wide range of radio frequency bands, from just above the AM
  21. broadcast band well up into the microwave region.  Within broad policy
  22. and technical limits established by FCC rules, amateurs have
  23. considerable freedom to experiment.  Frequency coordination within the
  24. amateur bands is handled largely by the amateurs themselves, in strong
  25. contrast to the various non-amateur, non-military packet radio
  26. experiments that often appear inhibited by regulatory red tape. 
  27. .IP [2]
  28. Amateur radio includes many operating modes and propagation
  29. techniques.  Packet radio coexists with more traditional modes such as
  30. analog voice (single-sideband and FM), Morse code, facsimile,
  31. radioteletype and television.  Signals are propagated directly or by the
  32. ionosphere, orbiting satellite or local hilltop repeater, and even the
  33. moon is occasionally used as a passive reflector! These modes support a
  34. broad range of applications, from casual socializing to technical
  35. experimentation for its own sake to public service in time of emergency. 
  36. Business use (profit or non-profit) is prohibited, however, and amateurs
  37. may not charge or accept payment for the communication services they
  38. provide. 
  39. .IP [3]
  40. Similarly, the amateurs themselves are a varied lot.  Some are
  41. communications professionals but many are not.  Amateur radio has a
  42. strong tradition of close-knit volunteer cooperation, strengthened by
  43. the knowledge that no one will profit financially from the efforts of
  44. others, at least not directly.  Amateurs therefore must be strongly
  45. motivated by an interest in communications technology for its own
  46. sake.  There is a strong parallel between many amateur packet radio
  47. experimenters and the early university computer science researchers
  48. described in Steven Levy's book "Hackers" [LEVY]; indeed, many \fIare\fR
  49. .FS
  50. Here I mean the original meaning of the word: one who loves
  51. computer programming for its own sake, not one who gains unauthorized
  52. access to computers.
  53. .FE
  54. computer hackers \** in their own right, because many of the same skills are
  55. required. 
  56. .IP [4]
  57. Amateur radio equipment is extremely inexpensive by commercial and
  58. military standards because it must be affordable by ordinary individuals
  59. to whom communications and computer networking is a hobby, not a
  60. profession.  As a new mode, amateur packet radio has emphasized using
  61. equipment the average amateur is already likely to have: a voice
  62. transceiver, a terminal or small personal computer.  The initial
  63. emphasis has been on low cost rather than performance and efficiency. 
  64. .NH
  65. The State of Amateur Packet Radio
  66. .PP
  67. The packet radio techniques now in widespread amateur use reflects this
  68. philosophy.  Almost all VHF/UHF amateur packet radio currently uses Bell
  69. 202-compatible modems, as the 1200/2200 Hz frequency-shift-keyed (FSK)
  70. tones they produce are easily fed into standard FM voiceband radios.  On
  71. HF (the so-called "short wave bands" below 30 Mhz) a crowded spectrum
  72. calls for more efficiency: standard FSK radioteletype modems with 170 Hz
  73. shift are used with single sideband (SSB) radios.  A major development
  74. is now underway that will apply digital signal processing (DSP) to
  75. amateur radio, with a major goal being the creation of more efficient
  76. low speed HF modems. 
  77. .PP
  78. When amateur packet radio began, there were few users and personal
  79. computers were much rarer than "dumb terminals." Slow modems could
  80. support the simple keyboard-to-keyboard "chatting" that was the usual
  81. operating style.  Increased activity along with the need to transfer
  82. electronic mail and other files has spurred development of higher speed
  83. modems.  One newly available unit uses MSK (Minimum Shift Keying) and
  84. operates at 56 kilobits/sec.  Such modems are restricted to the higher
  85. frequency bands because of the bandwidth required. 
  86. .PP
  87. The packet radio modem is generally incorporated into a special-purpose
  88. box called, for historical reasons, a Terminal Node Controller (TNC). 
  89. TNCs also contain single-board computers with the necessary firmware to
  90. execute the packet protocols.  One port on the TNC connects to the
  91. radio's audio I/O and push-to-talk leads, while an RS-232 connection is
  92. provided for the host terminal or computer.  A TNC is generally about
  93. the same size as a small telephone modem, although one new Japanese
  94. model is not much larger than a typical RS-232 "null modem." Lately HDLC
  95. adapter/modem cards for standard personal computers have appeared,
  96. eliminating the need for separate TNCs altogether. 
  97. .NH
  98. Radio Is Not Wire
  99. .PP
  100. It must be emphasized that the packet radio channel is radically
  101. different from the far more benign wire or fiber transmission
  102. path, and this heavily influences the design of a network and
  103. its lower-level protocols.  Although
  104. a collection of
  105. packet radio stations operating on a single, shared frequency channel
  106. bears a strong resemblance to multiple-access local area
  107. networks such as Ethernet (which, conversely, has been described as
  108. "packet radio on a cable") there are some important differences. 
  109. .IP [1]
  110. Not every station can hear the transmissions of every other
  111. station.  This violates a fundamental assumption of the
  112. Carrier Sense Multiple Access (CSMA) technique, namely the ability to
  113. defer transmitting when another station is already using the channel. 
  114. This is known as the "Hidden Terminal" problem and it can severely
  115. degrade the network's efficiency.
  116. .IP [2]
  117. It is impossible for a station to monitor the channel while
  118. transmitting because of the enormous difference between received and
  119. transmitted signal levels (150 dB is typical). This rules out
  120. collision detection a la Ethernet. 
  121. .IP [3]
  122. Depending on the modem hardware and RF path,
  123. the bit error rate of the channel
  124. may range from somewhat worse to much worse
  125. than a wire or fiber path.
  126. .IP [4]
  127. Due to bandwidth and power limitations, the signaling speed of the
  128. packet channel is usually much lower than a local area network.
  129. .PP
  130. Attacking these problems is now a major effort within amateur packet
  131. radio.  For example, it is possible to eliminate hidden terminals and to
  132. detect collisions if a full duplex RF repeater is used so that the
  133. stations can transmit and receive on separate frequencies
  134. simultaneously.  Or the network can be engineered such that each
  135. transmitter is assigned its own frequency, with each node listening to
  136. its neighbors with separate receivers.
  137. .NH
  138. Amateur Packet Radio Link Protocols
  139. .PP
  140. Since 1982, the standard amateur link level protocol has been "AX.25". 
  141. [ARRL82] It must be stressed that this name is somewhat of a misnomer;
  142. unlike BX.25 ("Bell System X.25"), AX.25 it is \fInot\fR compatible with
  143. CCITT X.25.  AX.25 was custom-designed for amateur radio, although it
  144. does incorporate many elements of X.25's link layer, LAPB (Link Access
  145. Procedures Balanced). 
  146. .PP
  147. As in X.25, AX.25 packets are sent synchronously in HDLC frames.  (At
  148. 1200 baud, the lack of start and stop bits gives a welcome, though
  149. modest, performance improvement!) Since AX.25 is used on a shared-access
  150. channel, half-duplex operation is the norm.  A datagram-style address
  151. header is included in the beginning of each frame.  As a minimum, the
  152. header contains the FCC-assigned callsigns of the destination and source
  153. stations in ASCII; this has the side benefit of satisfying FCC
  154. identification rules.  Beyond the source field may be up to eight
  155. "digipeater" addresses.  A digipeater is an intermediate station capable
  156. of receiving, storing and retransmitting a packet, usually on the same
  157. frequency.  Strict source routing is used, i.e., the sender must specify
  158. the entire digipeater string. 
  159. .PP
  160. Beyond the address field is the LAPB control field and a protocol ID
  161. (PID) byte.  The PID corresponds to the TYPE field in Ethernet; it
  162. specifies the upper level protocol is in use.  The most common PID now
  163. in use is F0 hex, which means "no upper level protocol, send data to the
  164. terminal." Much "packeting" goes on with no more protocol mechanism than
  165. this. 
  166. .NH
  167. Higher Level Protocols
  168. .PP
  169. Lately there has been much experimentation with higher level protocols
  170. on top of AX.25. In addition to the DARPA Internet suite, several
  171. other efforts are underway.
  172. .NH 2
  173. NET/ROM
  174. .PP
  175. The most popular implementation at present is a commercial product of
  176. Software 2000, Inc., and is called NET/ROM.  [BUSCH] This is a special ROM
  177. that replaces the standard firmware in a TNC, turning it into a terminal
  178. switch.  Users with conventional TNC software connect to a NET/ROM server
  179. node and may issue commands to connect to remote nodes and users.
  180. Internally, NET/ROM uses proprietary protocols: a connection-oriented
  181. "transport" protocol atop a connectionless network layer protocol.
  182. Automatic routing broadcasts establish network connectivity.  Externally,
  183. however, NET/ROM presents only a connection-oriented service, concatenating
  184. its transport connections with a single AX.25 connection from each user.
  185. Compatibility with existing packet stations and software is maintained at
  186. the cost of sacrificing true end-to-end reliability and requiring the user
  187. to learn NET/ROM commands and a certain amount of network topology
  188. information. 
  189. .NH 2
  190. Other Efforts
  191. .PP
  192. Other projects include "ROSE," [BEATTIE] an implementation of the packet
  193. layer from X.25, and TEXNET [MCDERMOTT].  The first components of ROSE are
  194. in the initial debugging stages, and TEXNET is being deployed, primarily in
  195. Texas and nearby areas.
  196. .NH 2
  197. TCP/IP on Amateur Packet Radio
  198. .PP
  199. The first amateur radio TCP/IP experiments were done by Richard Bisbey,
  200. NG6Q, with the ISI Amateur Radio Club, and Dave Mills, W3HCF. (Dave is well
  201. known to the Internet community as the creator of the Fuzzball, Network Time
  202. protocols, and a whole dictionary of colorful networking terms and
  203. expressions).  Both efforts adapted existing IP gateway hardware and
  204. software to the task.  Their work inspired me to create an Internet software
  205. package specifically designed for amateur packet radio use, running on
  206. hardware readily available to the average ham, and freely available in
  207. source form for study and experimentation. [KARN85A]
  208. .PP
  209. The result of this successful effort, to which several volunteers have
  210. made significant contributions, is the "KA9Q Internet Protocol Package."
  211. [KARN87]
  212. This software has now gained considerable operational experience.  A class-A
  213. network address (44) has been assigned to the Amateur Packet Radio (AMPR)
  214. subnetwork and a domain name, ampr.org, has just been registered.  This
  215. reflects the international nature of amateur radio; several dozen countries
  216. now have assignments in this address block.  In the discussion that
  217. follows, I will refer to this emerging TCP/IP-on-amateur-radio network as
  218. AMPRNET (Amateur Packet Radio Network).
  219. .NH 3
  220. Amateur IP Addressing
  221. .PP
  222. One important characteristic of AMPRNET is that the normally sharp
  223. distinction between Internet subnetworks is blurred.  In the
  224. standard Internet model, each subnetwork is a well defined entity, e.g., an
  225. Ethernet LAN or ARPANET WAN, and each is fully interconnected internally,
  226. logically if not physically.  In contrast, AMPRNET consists of individual
  227. stations and ad-hoc links, possibly unidirectional.  In other words, AMPRNET
  228. is a directed graph with individual stations, not fully connected
  229. subnetworks, at the nodes, and this required some significant changes in the
  230. interpretation of IP addresses. 
  231. .PP
  232. I call the approach I took "generalized subnetting" [KARN85B] since it goes
  233. beyond Internet standard subnetting, which only increased the number of
  234. allowable levels in the Internet addressing hierarchy from two to three.
  235. With generalized subnetting, the limit is 32, set by the number of bits in
  236. an IP address.  This scheme was invented independently for the Fuzzball IP
  237. routers, and Comer calls it "Subnet Routing" ([COMER] page 202).  The idea
  238. is that each entry in the routing table contains its own subnet mask.  A
  239. routing lookup returns the matching table entry having the widest subnet
  240. mask.  There is \fIno\fR hardwired notion of an IP address "class" (A, B or
  241. C) and the subnet mask corresponding to a given address's entry may be
  242. different from one router to the next.  This is a powerful technique,
  243. in that it allows the construction of an arbitrary network topology while
  244. still permitting the most compact routing table representation permitted by
  245. the address assignment strategy.  The ad-hoc "host specific" and "default"
  246. routing entries supported by most gateways are no longer necessary, since
  247. they are now merely special cases of a more general scheme. A host specific
  248. routing entry has a subnet mask of all ones, while the default route has a
  249. mask of all zeros. The default entry therefore matches any address, assuming
  250. some other entry (with a wider mask) doesn't also match it.
  251. .NH 3
  252. The KA9Q Internet Protocol Package
  253. .PP
  254. Most Internet software packages for the PC generally support only one
  255. application (server or client) at a time.  The ease of implementing
  256. custom applications is usually more important than the ability to
  257. support multiple simultaneous sessions, since other, larger systems
  258. running "real" operating systems (e.g., BSD UNIX and its derivatives)
  259. are usually available elsewhere on the net.  Suns and VAXes are still
  260. rare in the amateur radio world, however, so my goal was to create a
  261. usable network solely out of PC-class machines that could support at
  262. least the basic Internet applications simultaneously. 
  263. .PP
  264. Because PCs running MS-DOS don't support multitasking, however, I chose
  265. to build a rudimentary form of multitasking into a single executable
  266. program containing the protocol modules.  Unfortunately, this does make
  267. for an unusual programming environment.  Each application is structured
  268. as a state machine driven by external events.  For example, a TCP
  269. application is given three upcalls: receive data arrival, transmit data
  270. acknowledgement, and TCP state change.  The application is responsible
  271. for maintaining its own state between upcalls, and it must process
  272. upcalls without hogging or blocking the processor. 
  273. .PP
  274. The KA9Q package supports the major DARPA Internet protocols: IP and ICMP
  275. at the Internet layer, TCP and UDP at the Host-Host (Transport) layer,
  276. and Telnet, FTP and SMTP at the Application layer.  Multiple
  277. simultaneous server and client sessions are supported, with the only
  278. limit being available memory for control blocks and buffering. 
  279. .PP
  280. The package supports several subnet protocols and interfaces, with more
  281. under development.  Ethernet (the 3-Com 3C501 interface) and SLIP (using
  282. standard PC asynchronous ports) are supported. 
  283. .PP
  284. Since the package was developed specifically for AMPRNET,
  285. the AX.25 link level protocol is also incorporated.  AX.25 may be
  286. used alone (for compatibility with amateur stations that don't yet
  287. support the Internet protocols) or as a subnet mechanism for carrying IP
  288. datagrams.  The subnet interface is straightforward, with ARP [RFC826]
  289. used to map IP addresses into AX.25 callsigns.  ARP works automatically
  290. only when no digipeaters are involved; otherwise the mapping table must be
  291. set manually.
  292. .PP
  293. AX.25 provides two forms of data encapsulation, the I (Information) and
  294. the UI (Unnumbered Information) frames.  The former mode includes link
  295. level flow control and acknowledgement while the latter does not.  This
  296. recognizes that the quality of packet radio channels that make up AMPRNET
  297. varies widely, ranging from fading, noisy 300 bps
  298. channels on long haul HF bands to 56 kb/s line-of-sight paths on UHF
  299. frequencies.  Link level reliability mechanisms that are considered
  300. essential for performance on HF introduce intolerable overhead on
  301. reliable high speed links. 
  302. .PP
  303. The Type-of-Service (TOS) bits in each IP datagram select one mode or
  304. the other.  (If no bits are set, a default mode is used).  When I-frames
  305. are selected, the capability of fragmenting large datagrams at the link
  306. layer and immediately reassembling them at the other end of the link is
  307. also available.  This follows the recommendation in [KENT] to avoid
  308. excessive IP level fragmentation by providing transparent subnet
  309. fragmentation whenever the subnet maximum transmission unit (MTU) would
  310. otherwise be unusually small.  This facility is not available in UI
  311. mode, but this is acceptable since UI mode would only be used on high
  312. quality channels where large packets are already in use. 
  313. .NH
  314. Contributions of Amateur Packet Radio to Internetworking
  315. .PP
  316. 1200 baud amateur packet radio clearly represents the low end of the
  317. performance spectrum of subnetworks that now support the Internet
  318. protocols.  In the words of Mike O'Dell (also a ham, with callsign
  319. N4NLN), AMPRNET currently holds TCP/IP's "worst wire"
  320. award.  Frustration with the poor performance of existing TCP
  321. implementations over packet radio (primarily the fault of poor
  322. retransmission algorithms) motivated me to work in this area with Van
  323. Jacobsen and Craig Partridge.  My experiences have made me somewhat of a
  324. radical, particularly when I see other implementors making arbitrary
  325. assumptions about the longest possible Internet round-trip time, or
  326. minimum subnet throughput, or maximum packet loss rate.  The KA9Q TCP
  327. has the Van Jacobsen congestion control algorithms, plus my own
  328. heuristic for ensuring the accuracy of round trip time measurements in
  329. the face of retransmissions, and they work well over the air.  In
  330. keeping with the principle of "no arbitrary limits," there is no
  331. "give-up timer" or clipping of round trip estimates.  Retransmissions
  332. may occur indefinitely, subject to a back-off algorithm, of course; the
  333. decision to abort a connection is left up to the application or the
  334. human user. 
  335. .PP
  336. Because of its geographic dispersion, AMPRNET at present
  337. consists largely of isolated areas of activity.  It is \fInot\fR
  338. interconnected with the DARPA Internet, nor does it use any other
  339. government resources, so low cost commercial facilities (e.g., Telenet's
  340. PC Pursuit) have instead been used to link these "islands" on a part
  341. time basis with good results.  There seems to be considerable potential
  342. here to build an ad-hoc Internet out of available
  343. facilities, thus satisfying a major reason that amateur radio exists:
  344. public service, particularly in emergency communications. 
  345. .PP
  346. Our experiences with TCP/IP over amateur packet radio have contributed
  347. to the Internet effort as a whole by expanding the performance range of
  348. networks over which the protocols can operate.  We have encountered and
  349. attacked problems that the rest of the Internet community has not had to
  350. face, but these solutions are now available should they be needed.  In
  351. this way, amateur radio's charter for contributing to the state of the
  352. communication art is also fulfilled. 
  353. .NH
  354. Availability of the KA9Q Internet Protocol Package
  355. .PP
  356. The KA9Q Internet Package is not public domain, but it is available by
  357. anonymous FTP for free noncommercial use.  It may be obtained from
  358. louie.udel.edu (10.0.0.96) under /pub/ka9q as a collection of ARC format
  359. archives.  Source, executables and documentation is provided.  Although
  360. the primary execution environment is MS-DOS on the IBM PC and clones,
  361. the code has been ported to a variety of machines including the Apple
  362. Macintosh, the Commodore Amiga, the Atari ST, and various flavors of
  363. UNIX System V.  Although feedback and suggestions are welcome, this is a
  364. volunteer project so no warranties or guarantees can be offered. 
  365. .SH
  366. References
  367. .IP 1.
  368. [ARRL82] Fox, T., ed., Amateur Packet Radio Link Layer Protocol AX.25,
  369. American Radio Relay League. 
  370. .IP 2.
  371. [BEATTIE] Beattie, G., OSI: A Plan Comes Together, Proceedings of the
  372. 6th ARRL Amateur Radio Computer Networking Conference, ARRL 1987.
  373. .IP 3.
  374. [BUSCH] Busch, M. and Raikes, R., NET/ROM Version 1.0 User's Manual.
  375. Software 2000, Inc. 1987.
  376. .IP 4..
  377. [COMER] Comer, D., Internetworking with TCP/IP. Prentice Hall 1988.
  378. ISBN 0-13-470154-2.
  379. .IP 5.
  380. [KARN85] Karn, P., Price, H., and Diersing, R., Packet radio in the
  381. Amateur Service, IEEE Journal on Selected Areas in Communications, May
  382. 1985. 
  383. .IP 6.
  384. [KARN85A]
  385. Karn, P., TCP/IP: A Proposal for Amateur Packet Radio Levels 4 and 3.
  386. Proceedings of the
  387. 4th ARRL Amateur Radio Computer Networking Conference, ARRL 1985.
  388. .IP 7.
  389. [KARN85B]
  390. Karn, P., Addressing and Routing Issues in Amateur Packet Radio,
  391. Proceedings of the
  392. 4th ARRL Amateur Radio Computer Networking Conference, ARRL 1985.
  393. .IP 8.
  394. [KARN87]
  395. Karn, P., The KA9Q Internet (TCP/IP) Package: A Progress Report.
  396. Proceedings of the
  397. 6th ARRL Amateur Radio Computer Networking Conference, ARRL 1987.
  398. .IP 9.
  399. [KENT] Kent, C., and Mogul, J., Fragmentation Considered Harmful,
  400. Proceedings of ACM SIGCOMM 1987.
  401. .IP 10.
  402. [LEVY] Levy, S., Hackers. Dell 1984, ISBN 0-440-13405-6.
  403. .IP 11.
  404. [MCDERMOTT] McDermott, T., Overview of the TEXNET datagram protocol,
  405. Proceedings of the
  406. 6th ARRL Amateur Radio Computer Networking Conference, ARRL 1987.
  407. .IP 12.
  408. [RFC826] Plummer, D., An Ethernet Address Resolution Protocol, ARPA RFC 826.
  409. .SH
  410. Biography
  411. .PP
  412. Phil Karn received his BSEE from Cornell University in 1978 and his MSEE
  413. (Computer Engineering) from CMU in 1979.  After graduating, Phil worked
  414. at Bell Laboratories in Naperville, Illinois and Murray Hill,
  415. New Jersey.  With the breakup of the Bell System in 1984, Phil went to
  416. work for Bellcore in Morristown, New Jersey.  He is now a Member
  417. of the Technical Staff doing research into protocols for high speed
  418. fiber-based packet switching networks. 
  419. .PP
  420. Phil's interest in TCP/IP comes from two separate directions: amateur
  421. packet radio, and the large (about 1000 hosts) Internet he helped
  422. build and manage within Bellcore.  Phil has been a licensed radio
  423. amateur since 1971, and his interests there lie almost completely in the
  424. area of technical experimentation and development.  Phil is a member of
  425. the board of directors of Tucson Amateur Packet Radio (TAPR), the
  426. non-profit corporation largely responsible for making packet technology
  427. widely available to radio amateurs. He also sits on the Digital
  428. Communications Committee of the American Radio Relay League (ARRL), the
  429. US national amateur radio organization. 
  430. .PP
  431. In addition to terrestrial packet radio, Phil participates in the Radio
  432. Amateur Satellite Corporation (AMSAT), a group of volunteers that
  433. designs, builds and operates its own earth-orbiting satellites,
  434. including several that feature packet switched communications.
  435.